package com.bidevalution.dao.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.bidevalution.dao.entity.BeSectionExpertProgress;
import com.bidevalution.dao.entity.BeSectionExpertProgressKey;

public interface BeSectionExpertProgressMapper {
	int deleteByPrimaryKey(BeSectionExpertProgressKey key);

	int insert(BeSectionExpertProgress record);

	int insertSelective(BeSectionExpertProgress record);

	BeSectionExpertProgress selectByPrimaryKey(BeSectionExpertProgressKey key);

	int updateByPrimaryKeySelective(BeSectionExpertProgress record);

	int updateByPrimaryKey(BeSectionExpertProgress record);

	List<BeSectionExpertProgress> selectFinishList(@Param("sectionStepId") String sectionStepId);

	List<BeSectionExpertProgress> selectListByStepId(String sectionStepId);

	void deleteBySectionId(String sectionId);
	
	List<BeSectionExpertProgress> selectListBySectionId(String sectionId);
	
	/**
	 * 根据环节id更新专家评审进度
	 *
	 * @param record
	 * @return
	 */
	int updateStatusById(BeSectionExpertProgress record);
	
	void deleteBySectionIdAndExpertId(@Param("sectionId")String sectionId, @Param("expertId")String expertId);
	List<BeSectionExpertProgress> selectBySectionIdAndExpertId(@Param("sectionId")String sectionId, @Param("expertId")String expertId);

	/**
	 * 查询除当前专家外未完成的专家
	 * @param sectionStepId
	 * @param expertId
	 * @return
	 */
	List<BeSectionExpertProgress> selectUnFinishExpert(@Param("sectionStepId") String sectionStepId, @Param("expertId")String expertId);
}